type tb_game_enemy={ readonly name:string,readonly ai:number,readonly harm:number,readonly harm_time:number,readonly hp:number,readonly speed:number,readonly icon:number,readonly icon_num:number,readonly money1_rate:number,readonly money2_rate:number,readonly money3:number};
type tb_game_general={ readonly name:string,readonly colour:number,readonly harm_type:number,readonly bullet_type:number,readonly harm:number,readonly harm_up:number,readonly distance:number,readonly range:number,readonly harm_time:number,readonly icon:number,readonly icon_num:number,readonly desc:string,readonly max_level:number,readonly up_money3:number};
type tb_game_level={ readonly enemy:number,readonly time:number};
type tb_game_pos={ readonly x:number,readonly y:number,readonly nx:number,readonly ny:number};

/*
* name;
*/
class tb_game{
    static readonly enemy:{[key:number]:tb_game_enemy} = {
		[1]:{name:'怪物1' , ai:1 , harm:0 , harm_time:1000 , hp:100 , speed:1 , icon:1 , icon_num:2 , money1_rate:10 , money2_rate:10 , money3:1},
		[2]:{name:'哥布林' , ai:1 , harm:100 , harm_time:1000 , hp:100 , speed:1 , icon:3 , icon_num:4 , money1_rate:10 , money2_rate:10 , money3:1},
		[3]:{name:'狗' , ai:1 , harm:0 , harm_time:1000 , hp:200 , speed:2 , icon:4 , icon_num:4 , money1_rate:10 , money2_rate:10 , money3:1},
		[4]:{name:'怪物4' , ai:1 , harm:0 , harm_time:1000 , hp:100 , speed:1 , icon:1 , icon_num:5 , money1_rate:10 , money2_rate:10 , money3:1},
		[5]:{name:'怪物5' , ai:1 , harm:0 , harm_time:1000 , hp:100 , speed:1 , icon:1 , icon_num:2 , money1_rate:10 , money2_rate:10 , money3:1},
		[6]:{name:'boss1' , ai:1 , harm:0 , harm_time:1000 , hp:500 , speed:1 , icon:2 , icon_num:4 , money1_rate:0 , money2_rate:300 , money3:10},
		[7]:{name:'boss2' , ai:2 , harm:100 , harm_time:1000 , hp:500 , speed:1 , icon:2 , icon_num:4 , money1_rate:0 , money2_rate:300 , money3:10}
	};
	static readonly general:{[key:number]:tb_game_general} = {
		[1]:{name:'英雄1' , colour:1 , harm_type:1 , bullet_type:1 , harm:17 , harm_up:5 , distance:90 , range:0 , harm_time:1000 , icon:1 , icon_num:7 , desc:'绿色' , max_level:100 , up_money3:10},
		[2]:{name:'英雄2' , colour:1 , harm_type:2 , bullet_type:0 , harm:17 , harm_up:5 , distance:90 , range:0 , harm_time:1000 , icon:2 , icon_num:6 , desc:'绿色' , max_level:100 , up_money3:10},
		[3]:{name:'英雄3' , colour:1 , harm_type:1 , bullet_type:2 , harm:17 , harm_up:5 , distance:140 , range:0 , harm_time:1000 , icon:3 , icon_num:6 , desc:'绿色' , max_level:100 , up_money3:10},
		[4]:{name:'英雄4' , colour:2 , harm_type:1 , bullet_type:3 , harm:27 , harm_up:7 , distance:140 , range:70 , harm_time:500 , icon:4 , icon_num:7 , desc:'蓝色' , max_level:100 , up_money3:10},
		[5]:{name:'英雄5' , colour:2 , harm_type:1 , bullet_type:1 , harm:27 , harm_up:7 , distance:90 , range:0 , harm_time:1000 , icon:1 , icon_num:7 , desc:'蓝色' , max_level:100 , up_money3:10},
		[6]:{name:'英雄6' , colour:3 , harm_type:2 , bullet_type:0 , harm:37 , harm_up:7 , distance:90 , range:0 , harm_time:1000 , icon:2 , icon_num:6 , desc:'紫色' , max_level:100 , up_money3:10},
		[7]:{name:'英雄7' , colour:3 , harm_type:1 , bullet_type:3 , harm:37 , harm_up:10 , distance:90 , range:0 , harm_time:1000 , icon:3 , icon_num:6 , desc:'紫色' , max_level:100 , up_money3:10},
		[8]:{name:'英雄8' , colour:4 , harm_type:1 , bullet_type:1 , harm:47 , harm_up:10 , distance:90 , range:0 , harm_time:1000 , icon:4 , icon_num:7 , desc:'金色' , max_level:100 , up_money3:10},
		[9]:{name:'英雄9' , colour:4 , harm_type:1 , bullet_type:1 , harm:47 , harm_up:10 , distance:90 , range:0 , harm_time:1000 , icon:1 , icon_num:7 , desc:'金色' , max_level:100 , up_money3:10}
	};
	static readonly level:{[level:number]:{[key:number]:tb_game_level}} = {
		[1]:{
			[1]:{enemy:1 , time:0},
		},
		[2]:{
			[1]:{enemy:1 , time:0},
			[2]:{enemy:1 , time:1000},
			[3]:{enemy:1 , time:2000}
		},
		[3]:{
			[1]:{enemy:1 , time:0},
			[2]:{enemy:1 , time:1000},
			[3]:{enemy:1 , time:2000},
			[4]:{enemy:1 , time:3000},
			[5]:{enemy:1 , time:4000},
			[6]:{enemy:1 , time:5000}
		},
		[4]:{
			[1]:{enemy:1 , time:0},
			[2]:{enemy:1 , time:1000},
			[3]:{enemy:1 , time:2000},
			[4]:{enemy:1 , time:3000},
			[5]:{enemy:1 , time:4000},
			[6]:{enemy:1 , time:5000},
			[7]:{enemy:1 , time:6000}
		},
		[5]:{
			[1]:{enemy:1 , time:0},
			[2]:{enemy:1 , time:1000},
			[3]:{enemy:1 , time:2000},
			[4]:{enemy:1 , time:3000},
			[5]:{enemy:1 , time:4000},
			[6]:{enemy:1 , time:5000},
			[7]:{enemy:1 , time:6000},
			[8]:{enemy:1 , time:7000}
		},
		[6]:{
			[1]:{enemy:3 , time:0},
			[2]:{enemy:3 , time:1000},
			[3]:{enemy:3 , time:2000},
			[4]:{enemy:2 , time:3000},
			[5]:{enemy:2 , time:4000},
			[6]:{enemy:2 , time:5000},
			[7]:{enemy:1 , time:6000},
			[8]:{enemy:1 , time:7000},
			[9]:{enemy:1 , time:8000},
			[10]:{enemy:1 , time:9000}
		},
		[7]:{
			[1]:{enemy:3 , time:0},
			[2]:{enemy:3 , time:1000},
			[3]:{enemy:3 , time:2000},
			[4]:{enemy:2 , time:3000},
			[5]:{enemy:2 , time:4000},
			[6]:{enemy:2 , time:5000},
			[7]:{enemy:1 , time:6000},
			[8]:{enemy:1 , time:7000},
			[9]:{enemy:1 , time:8000},
			[10]:{enemy:1 , time:9000},
			[11]:{enemy:6 , time:10000},
			[12]:{enemy:1 , time:11000},
			[13]:{enemy:1 , time:12000},
			[14]:{enemy:1 , time:13000},
			[15]:{enemy:1 , time:14000}
		}
	};

	static readonly pos:{[level:number]:{[key:number]:tb_game_pos}} = {
		[1]:{
			[1]:{x:180 , y:385 , nx:4 , ny:2},
			[2]:{x:320 , y:385 , nx:4 , ny:4},
			[3]:{x:460 , y:385 , nx:4 , ny:6},
			[4]:{x:180 , y:565 , nx:6 , ny:2},
			[5]:{x:320 , y:565 , nx:6 , ny:4},
			[6]:{x:460 , y:565 , nx:6 , ny:6},
			[7]:{x:180 , y:710 , nx:8 , ny:2},
			[8]:{x:320 , y:710 , nx:8 , ny:4},
			[9]:{x:460 , y:710 , nx:8 , ny:6}
		},
		[2]:{
			[1]:{x:215 , y:385 , nx:4 , ny:3},
			[2]:{x:355 , y:385 , nx:4 , ny:5},
			[3]:{x:500 , y:385 , nx:4 , ny:7},
			[4]:{x:75 , y:565 , nx:6 , ny:1},
			[5]:{x:215 , y:565 , nx:6 , ny:3},
			[6]:{x:355 , y:565 , nx:6 , ny:5},
			[7]:{x:215 , y:745 , nx:8 , ny:3},
			[8]:{x:355 , y:745 , nx:8 , ny:5},
			[9]:{x:500 , y:745 , nx:8 , ny:7}
		}
	};
}